#ifndef __TARGET_DISK_H__
#define __TARGET_DISK_H__

#include <windows.h>
#include "TestSegment.h"
#include <time.h>
#include "hr_time.h"


class CTargetDisk
{
public:
	// public methods
	CTargetDisk(char* pszDiskName, EDeviceType eDevType);
	~CTargetDisk(void);


	bool PreTest(char  *pszFileName, EIOType eIoType);
	double PerformTest();
	void PostTest();

	void AddTest(CTestSegment* newSegmentTest);
	void CleanTestList();

	BOOL GetLogicalDiskPhysicalInfo();

	// public members
	CTestSegment*	m_psTestsList;
	int				m_nTestsNum;
	CTestSegment*	m_pNextTestSegment;

private:

	// private methods
	wchar_t* ConvertChar2Wstr(char  *pszSrc);
	void InitializeDisk();
	bool DoOverlappedIO(CTestSegment* psTest);

	// private members
	wchar_t*	m_pwLogicalDiskName;
	wchar_t*	m_pwFileName;

	HANDLE		m_phDiskFile;
	HANDLE		m_hCompletionQueue;

	// Logical drive physical information
	DWORD		m_dwSectPerClust;
    DWORD		m_dwBytesPerSect;
    DWORD		m_dwFreeClusters;
    DWORD		m_dwTotalClusters;

	EDeviceType m_eDevType;
	CStopWatch*	m_psStopWatch;




};

#endif // __TARGET_DISK_H__